Skip to content

Isolate and report serialization errors#203

Merged
rohitpaulk merged 1 commit into
masterfrom
rohitpaulk/fix-batch-serialization
Jul 30, 2019
Merged

Isolate and report serialization errors#203
rohitpaulk merged 1 commit into
masterfrom
rohitpaulk/fix-batch-serialization

Conversation

@rohitpaulk

Copy link
Copy Markdown
Collaborator

Fixes the second part of #180. First part was handled in #187.

The second surprise was that not only did we lose the events with an unserializable property (the "bad events"), but we also lost an order of magnitude more unrelated "good" events. Any good event in the same Rails process as a bad event had a chance of not making it to our destinations. My unsubstantiated hunch is that if a bad event is enqueued with a .track call, then all events in the batch (good or bad) will fail to make it to Segment servers.

This commit adds error handling for JSON generation, and ensures that
one bad event doesn't affect other good events in a batch.

Fixes #180
@rohitpaulk rohitpaulk changed the title Handle serialization errors to not affect good events Isolate and report serialization errors Jul 29, 2019
@rohitpaulk rohitpaulk requested a review from f2prateek July 29, 2019 16:58
@rohitpaulk rohitpaulk merged commit 328c914 into master Jul 30, 2019
@rohitpaulk rohitpaulk deleted the rohitpaulk/fix-batch-serialization branch July 30, 2019 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants